Some motor-driven objects in machine tools and the like can be so large that the driven objects cannot be accelerated and decelerated by one motor alone. Furthermore, large backlash between mechanical elements of a transmission mechanism connected to a motor drive shaft and a driven object may prevent the driven object from being stably moved. In that case, tandem control is employed in which a single driven object is driven by two motors (For example, Japanese Unexamined Patent Publications No. JP-A-8-174481, JP-A-2003-79180, JP WO2004/92859, JP-A-2009-177881).
In such tandem control, one of two motors functions as a main motor having a drive shaft that acts as a master shaft coupled to a transmission mechanism. The other motor functions as a sub motor having a drive shaft that acts as a slave shaft coupled to a transmission mechanism.
To perform tandem control, backlash between mechanical elements of the transmission mechanism connected to the drive shaft of the motor and the driven object needs to be minimized. Therefore, a motor controller has been proposed that generates a preload torque value, which is a torque value added to a torque command value beforehand such that a force applied to the drive shaft of the main motor and a force applied to the drive shaft of the sub motor are in opposite directions (For example, Japanese Unexamined Patent Publications No. JP-A-8-16246, JP-A-2001-273037).
Further, adverse effects caused by a difference between the timing of detecting the speed of the main motor and the timing of detecting the speed of the sub motor on control of the motors and the like and overheat of the motors caused by such differences in tandem control need to be avoided. Therefore, a motor controller has been proposed that uses an integrated value of speed error between a speed command value for the main motor and the speed of the main motor to generate a torque command value for the main motor and a torque command value for the sub motor (For example, Japanese Unexamined Patent Publication No. JP-A-2003-189657).
Another motor controller has been proposed that generates a preload torque value and uses an integrated value of speed error between a speed command value for the main motor and the speed of the main motor to generate a torque command value for the main motor and a torque command value for the sub motor (For example, Japanese Unexamined Patent Publication No. JP-A-2010-172054).
The integrated value of speed error between a speed command value for a main motor and the speed of the main motor may be used to generate a torque command value for the main motor and a torque command value for a sub motor. In that case, there is a problem that when the sub motor is being mainly driven, in other words, when the acceleration of the main motor is negative, a position error between a position command value for the sub motor and the position of the sub motor can increase to the extent of adversely affecting the control of the motors.
An object of the present invention is to provide a motor controller capable of avoiding adverse effects of an increased position error on the control of two driven motors when any one of the two motors is mainly driven.